<%@page import="org.apache.commons.lang.time.DateUtils"%>
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<jsp:include page="WEB-INF/incl/htmlHeader.jsp" />
<title>Welcome! | Cult Cinema Inc</title>
</head>
<body id="index">
<jsp:include page="WEB-INF/incl/header.jsp" />
<div id="pageheader">
	<div class="container">
		<h1>Cinemas</h1>
	</div>
</div>
<div id="main" class="container">
	<c:forEach var="h" items="${requestScope.houseList}">
		<div class="entry">
			<div class="title">
				<h1>${h.name}</h1>
				<h2>${h.address}</h2>
			</div>
			<table class="data-table" style="width:100%">
				<tr>
					<th scope="col"><fmt:message key="table.header.movie" bundle="${uitext}"/></th>
					<th scope="col"></th>
					<th scope="col"><fmt:message key="table.header.schedule" bundle="${uitext}"/></th>
					<th scope="col"><fmt:message key="schedule.price" bundle="${uitext}"/></th>
					<th scope="col"></th>
				</tr>
				
				<c:forEach var="s" items="${requestScope.houseScheduleMap[h.id]}">
				<tr>
					<td><p>${s.movieName}</p></td>
					<td></td>
					<td><fmt:formatDate value="${s.scheduleStart}" pattern="dd/MM/yyyy hh:mmaaa" /></td>
					<td>${s.price}</td>
					<td><a href="seatPlan.do?scheduleId=${s.id}"><div class="blue_btn large_btn"><fmt:message key="table.action.buy" bundle="${uitext}"/></div></a></td>
				</tr>
				</c:forEach>
			</table>
		</div>
	</c:forEach>
</div>
<jsp:include page="WEB-INF/incl/footer.jsp" />
</body>
</html>